package edu.ucsc.mit2008.swan.coreUI.internal.menu.file;

import org.eclipse.jface.action.Action;

import edu.ucsc.mit2008.swan.core.CorePlugin;

/**
 * Action for Exit menu.
 * 
 * @author Thushara Sanjeewa Ramasinghe
 * 
 */
public class ExitAction extends Action {

	public ExitAction() {
		super("Exit");
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void run() {
		CorePlugin corePlugin = CorePlugin.getDefault();
		try {
			corePlugin.stop(corePlugin.getContext());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
